    $(function(){
    	init();
    })
    function init(){
    	layui.use('table', function(){
    		  var table = layui.table;
    		  table.render({
    			  height: 20
    		  });
    	});	
    }
	layui.use('form', function() {
		var form = layui.form;

		form.on('submit(formDemo)', function(data) {
			$.post("SmsConfigurationInsert.do", {
				conten : data.field.conten,
				pass : data.field.pass,
				phone : data.field.phone,
				trues : data.field.trues,
			}, function(res) {
				if (res.type == 1) {
					
					layer.alert("添加成功");
								// 获得frame索引
								window.location.reload();
				} else {
					layer.msg("修改失败", {
						area : [ '300px', '200px' ]
					});
					setTimeout(function() {
						//刷新
						location.reload();
					}, 1000);
				}
			}, "json")

			return false;
		});
	});